package com.weslide.weslideapp.fragment;

import com.weslide.weslideapp.activity.MainActivity_de;

import android.support.v4.app.Fragment;
import android.view.View;

public class WeSlideFragment extends Fragment {
	private static final String TAG = "WeSlideFragment";
	protected View globalView;

	public GlobalNavigationFragment getGlobalNavigatrionFragment() {
		Fragment fragment = getParentFragment();
		while (fragment != null) {
			if (fragment != null) {
				if (fragment instanceof GlobalNavigationFragment) {
					break;
				} else {
					fragment = fragment.getParentFragment();
				}
			}
		}
		if (fragment != null) {
			GlobalNavigationFragment navigationFragment = (GlobalNavigationFragment) fragment;
			return navigationFragment;
		} else {
			return null;
		}
	}

	public MainActivity_de getMainActivity() {
		return (MainActivity_de) getActivity();
	}

	protected View findViewById(int id) {
		return globalView.findViewById(id);
	}
}
